import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const SecurityIncidentStatusMeta: IPublicTypeComponentMetadata = {
  componentName: 'SecurityIncidentStatus',
  title: '重点治安事件状态',
  category: '安全组件',
  group: '综合执法',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: 'hzdz-charts',
    version: '0.1.0',
    exportName: 'SecurityIncidentStatus',
    main: 'src/index.tsx',
    destructuring: true,
    subName: ''
  },
  props: [
    {
      name: 'ref',
      propType: 'object',
    },
    {
      name: 'key',
      propType: 'string',
    },
    {
      name: 'style',
      propType: 'object',
    },
  ],
  configure: {
    props: [
      // 基础配置
      {
        name: 'basic',
        type: 'group',
        display: 'accordion',
        title: {
          label: '基础配置',
        },
        items: [
          {
            name: 'width',
            title: {
              label: '宽度',
              tip: '组件宽度，支持数字或字符串'
            },
            setter: {
              componentName: 'MixedSetter',
              props: {
                setters: [
                  'StringSetter',
                  'NumberSetter'
                ]
              }
            }
          },
          {
            name: 'height',
            title: {
              label: '高度',
              tip: '组件高度，支持数字或字符串'
            },
            setter: {
              componentName: 'MixedSetter',
              props: {
                setters: [
                  'StringSetter',
                  'NumberSetter'
                ]
              }
            }
          },
          {
            name: 'title',
            title: {
              label: '标题',
              tip: '组件主标题'
            },
            setter: 'StringSetter'
          },
          {
            name: 'subtitle',
            title: {
              label: '副标题',
              tip: '组件副标题'
            },
            setter: 'StringSetter'
          }
        ]
      }
    ],
    supports: {
      style: true,
      className: true,
      events: ['onClick']
    }
  }
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '重点治安事件状态',
    screenshot: '',
    schema: {
      componentName: 'SecurityIncidentStatus',
      props: {
        width: 500,
        height: 455,
        title: '重点治安事件状态',
        subtitle: 'Status of major public security incidents'
      }
    }
  }
];

export default {
  ...SecurityIncidentStatusMeta,
  snippets,
};
